Skip to content

Conversation

kevinoid
Copy link

Loading azure-devops/azext_devops/devops_sdk/*/feed/models.py with Python 3.12 produces the following warnings:

/path/to/azure-devops/azext_devops/devops_sdk/v5_0/feed/models.py:101: SyntaxWarning: invalid escape sequence '\,'
  """FeedCore.
/path/to/azure-devops/azext_devops/devops_sdk/v5_0/feed/models.py:209: SyntaxWarning: invalid escape sequence '\,'
  """FeedUpdate.
/path/to/azure-devops/azext_devops/devops_sdk/v5_0/feed/models.py:985: SyntaxWarning: invalid escape sequence '\,'
  """Feed.

This occurs due to the presence of the invalid escape sequence \, in docstrings for FeedCore, FeedUpdate, and Feed, which produces a SyntaxWarning in Python 3.12 as a result of python/cpython#98401.

Unresolved Issues

This PR changes \, to \\,, which avoids the SyntaxWarning, but doesn't fix the ambiguity of what is being communicated: \\, now appears twice in the list. Is the intention to indicate that comma and backslash are illegal? Perhaps ,, or \\,, would be clearer?

Thanks for considering,
Kevin

Loading azure-devops/azext_devops/devops_sdk/*/feed/models.py with
Python 3.12 produces the following warnings:

    /path/to/azure-devops/azext_devops/devops_sdk/v5_0/feed/models.py:101: SyntaxWarning: invalid escape sequence '\,'
      """FeedCore.
    /path/to/azure-devops/azext_devops/devops_sdk/v5_0/feed/models.py:209: SyntaxWarning: invalid escape sequence '\,'
      """FeedUpdate.
    /path/to/azure-devops/azext_devops/devops_sdk/v5_0/feed/models.py:985: SyntaxWarning: invalid escape sequence '\,'
      """Feed.

This occurs due to the presence of the invalid escape sequence `\,` in
docstrings for FeedCore, FeedUpdate, and Feed, which produces a
SyntaxWarning in Python 3.12 as a result of
<python/cpython#98401>.

Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant